package com.yeung.ssm.controller;

import com.yeung.ssm.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class EmployeeController {
    @Autowired
    EmployeeService employeeService;

    @RequestMapping("/emps")
//    @ResponseBody
    public String emps(ModelMap map) {
        map.put("emps", employeeService.getEmps());
        return "/list";
    }

}
